upload and display an image with javascript